package data.set.adaptator;

import java.util.Iterator;

import data.set.OfflineSetIterator;

/**
 * Creates an iterator from an offlinesetiterator
 * @author guillaumes
 *
 * @param <A>
 */
public class Iterator_FromOfflineSetIterator<A> implements Iterator<A> {

	protected OfflineSetIterator<A> it;

	/**
	 * 
	 * @param iterator : the offlinesetiterator
	 */
	public Iterator_FromOfflineSetIterator(OfflineSetIterator<A> iterator)
	{
		this.it=iterator;
	}
	public boolean hasNext() {
		return it.hasNext();
	}
	public A next() {
		it.next();
		return(it.getCurrentObject());
	}
	public void remove() throws UnsupportedOperationException
	{
		throw new UnsupportedOperationException();
	}
}
